﻿using ConsoleApp29;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WinFormTest01
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            // TODO: 这行代码将数据加载到表“admin4000DataSet.Uu”中。您可以根据需要移动或删除它。
            //this.uuTableAdapter.Fill(this.admin4000DataSet.Uu);
            var cmdString = "select * from Uu";
            var dataTable=DbHelper.GetDataTable(cmdString);

            DataGridView dataGridView = new DataGridView();
            OtherForm otherForm = new OtherForm();
            otherForm.Show();
            MessageBox.Show("千磨万击还坚韧","哦豁！");
            //this.Hide();
            //dataGridView1.DataSource = dataTable;
        }

        private void Form1_MouseClick(object sender, MouseEventArgs e)
        {
            List<Color> colors = new List<Color>();
            colors.Add(Color.Red);
            colors.Add(Color.Yellow);
            colors.Add(Color.Gray);
            colors.Add(Color.Purple);
            colors.Add(Color.Pink);
            colors.Add(Color.White);
            colors.Add(Color.Black);
            Random random = new Random();
            var randInt = random.Next(0, colors.Count);
            var randColor = colors[randInt];
            BackColor = randColor;

        }
    }
}
